Skip to content

gh-149879: Fix multiprocessing tests on Cygwin#149999

Closed
vstinner wants to merge 2 commits into
python:mainfrom
vstinner:mp_cygwin
Closed

gh-149879: Fix multiprocessing tests on Cygwin#149999
vstinner wants to merge 2 commits into
python:mainfrom
vstinner:mp_cygwin

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented May 18, 2026

  • Disable fork and forkserver start methods on Cygwin
  • Disable AF_UNIX connection family on Cygwin

* Disable fork and forkserver start methods on Cygwin
* Disable AF_UNIX connection family on Cygwin
@vstinner
Copy link
Copy Markdown
Member Author

Two test_multiprocessing_spawn.test_misc tests are still failing and requires more investigation:

  • FAIL: test_resource_tracker_sigterm (test.test_multiprocessing_spawn.test_misc.TestResourceTracker.test_resource_tracker_sigterm)
    test.test_multiprocessing_spawn.test_processes
  • FAIL: test_wait_result (test.test_multiprocessing_spawn.test_processes.WithProcessesTestCondition.test_wait_result)

@vstinner vstinner marked this pull request as ready for review May 18, 2026 20:37
@vstinner vstinner requested review from gpshead and vsajip as code owners May 18, 2026 20:37
@vstinner
Copy link
Copy Markdown
Member Author

The forkserver start method requires multiprocessing.reduction.HAVE_SEND_HANDLE which is False on Cygwin:

HAVE_SEND_HANDLE = (sys.platform == 'win32' or
                    (hasattr(socket, 'CMSG_LEN') and
                     hasattr(socket, 'SCM_RIGHTS') and
                     hasattr(socket.socket, 'sendmsg')))

I disabled SCM_RIGHTS and sendmsg() in the socket module on Cygwn.

The "win32" implementation uses the _winapi extension which is not available on Cygwin.

@vstinner
Copy link
Copy Markdown
Member Author

Disable fork and forkserver start methods on Cygwin

I tested again and in fact, it's possible to support the fork start method on Cygwin. I close this PR and I wrote PR gh-150031 instead.

@vstinner vstinner closed this May 18, 2026
@vstinner vstinner deleted the mp_cygwin branch May 18, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant